From 230fcecae8b00c88f66aff14a4ac34b1143fc5bb Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Tue, 8 Aug 2006 21:06:03 +0000 Subject: [PATCH] Whitespace cleanup. (synthesize_crossing_events): Add comments and prevent 2006-08-08 Richard Hult * gdk/quartz/gdkevents-quartz.c: (poll_func): Whitespace cleanup. (synthesize_crossing_events): Add comments and prevent a crash. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gdk/quartz/gdkevents-quartz.c | 17 ++++++++++++----- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5253c1da07..d02c45e581 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-08-08 Richard Hult + + * gdk/quartz/gdkevents-quartz.c: (poll_func): Whitespace cleanup. + (synthesize_crossing_events): Add comments and prevent a crash. + 2006-08-08 Michael Natterer * gdk/quartz/gdkwindow-quartz.c diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5253c1da07..d02c45e581 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-08-08 Richard Hult + + * gdk/quartz/gdkevents-quartz.c: (poll_func): Whitespace cleanup. + (synthesize_crossing_events): Add comments and prevent a crash. + 2006-08-08 Michael Natterer * gdk/quartz/gdkwindow-quartz.c diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c index 4fad00b932..c389a5099b 100644 --- a/gdk/quartz/gdkevents-quartz.c +++ b/gdk/quartz/gdkevents-quartz.c @@ -250,7 +250,6 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_) { if ([event type] == NSApplicationDefined) { - pthread_mutex_lock (&pollfd_mutex); for (i = 0; i < n_pollfds; i++) @@ -282,6 +281,7 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_) if (n_active == 0 && wakeup_pipe[1]) { char c = 'A'; + write (wakeup_pipe[1], &c, 1); } @@ -289,8 +289,8 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_) { ufds[0].revents = G_IO_IN; - /* FIXME: We can't assert here, what we need to to is to have a queue - * for events instead. + /* FIXME: We can't assert here, but we might need to have a + * queue for events instead. */ /*g_assert (current_event == NULL);*/ @@ -955,8 +955,15 @@ synthesize_crossing_events (GdkWindow *window, } else { - /* Dunno where we are coming from */ - synthesize_enter_event (window, nsevent, mode, GDK_NOTIFY_UNKNOWN); + /* This means we have not current_mouse_window. FIXME: Should + * we make sure to always set the root window instead of NULL? + */ + + /* FIXME: Figure out why this is being called with window being + * NULL. The check works around a crash for now. + */ + if (window) + synthesize_enter_event (window, nsevent, mode, GDK_NOTIFY_UNKNOWN); } _gdk_quartz_update_mouse_window (window); -- 2.30.2